jekyll-theme-zer0 1.8.2 → 1.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +33 -3
  3. data/README.md +98 -7
  4. data/_data/content_statistics.yml +253 -251
  5. data/_includes/components/nav-export.html +61 -0
  6. data/_includes/components/nav-overview.html +54 -0
  7. data/scripts/bin/install +52 -705
  8. data/scripts/github-setup.sh +0 -0
  9. data/scripts/install/README.md +162 -0
  10. data/scripts/install/ai/client.sh +164 -0
  11. data/scripts/install/ai/diagnose.sh +81 -0
  12. data/scripts/install/ai/prompts/diagnose.system.md +42 -0
  13. data/scripts/install/ai/prompts/spec.schema.json +129 -0
  14. data/scripts/install/ai/prompts/suggest.system.md +43 -0
  15. data/scripts/install/ai/prompts/wizard.system.md +142 -0
  16. data/scripts/install/ai/suggest.sh +57 -0
  17. data/scripts/install/ai/wizard.sh +150 -0
  18. data/scripts/install/apply.sh +156 -0
  19. data/scripts/install/cli.sh +561 -0
  20. data/scripts/install/diff.sh +128 -0
  21. data/scripts/install/doctor.sh +168 -0
  22. data/scripts/install/fs.sh +138 -0
  23. data/scripts/install/log.sh +119 -0
  24. data/scripts/install/plan.sh +299 -0
  25. data/scripts/install/platform.sh +122 -0
  26. data/scripts/install/prompt.sh +124 -0
  27. data/scripts/install/repair.sh +45 -0
  28. data/scripts/install/scrape.sh +535 -0
  29. data/scripts/install/scrape_html.py +764 -0
  30. data/scripts/install/spec.sh +486 -0
  31. data/scripts/install/tasks/_registry.sh +65 -0
  32. data/scripts/install/tasks/agents.sh +60 -0
  33. data/scripts/install/tasks/config.sh +37 -0
  34. data/scripts/install/tasks/data.sh +18 -0
  35. data/scripts/install/tasks/deploy_azure-swa.sh +17 -0
  36. data/scripts/install/tasks/deploy_docker-prod.sh +21 -0
  37. data/scripts/install/tasks/deploy_github-pages.sh +18 -0
  38. data/scripts/install/tasks/devcontainer.sh +26 -0
  39. data/scripts/install/tasks/docker.sh +29 -0
  40. data/scripts/install/tasks/gemfile.sh +42 -0
  41. data/scripts/install/tasks/gitignore.sh +26 -0
  42. data/scripts/install/tasks/marker.sh +46 -0
  43. data/scripts/install/tasks/nav.sh +18 -0
  44. data/scripts/install/tasks/pages.sh +61 -0
  45. data/scripts/install/tasks/readme.sh +27 -0
  46. data/scripts/install/tasks/scrape.sh +348 -0
  47. data/scripts/install/template.sh +138 -0
  48. data/scripts/install/tui.sh +110 -0
  49. data/scripts/install/upgrade.sh +49 -0
  50. data/scripts/lib/install/template.sh +1 -0
  51. metadata +49 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4a5535ac8b6cb2f633d3c9012cedffd62cecc4aafb7d7c9bf4db18a2fa79df35
4
- data.tar.gz: 334e88db5c5f5a1767927e6914985b4d9bbe3f0ac3edf9445e4f62bdcc14f9a2
3
+ metadata.gz: 59e76e7441c30caa3fcdf009b33efa94d28937c7f16d945ec2f51e1775729523
4
+ data.tar.gz: 274f85d80f42272ad148fedbffed608b858669b7a02caedbfcd6536fbf5ead44
5
5
  SHA512:
6
- metadata.gz: 163e85d4f162f11bd8b4aa437324d6530fa2b534a3a81fb0d962dfd164da74a0c68c3bc0a97d42d0d14d85655a8cd448892ee6d3b817b4d378dcf2142ae59243
7
- data.tar.gz: 7b65ef56b6895f27839fb24cc34c0a9ede9f05ac03cfedc9727387209cd38a41f3f9cec336f7927bfa4424cc097aa5ad11d6501d7b7a45a3ffe73dd956b15226
6
+ metadata.gz: b8f97ce130daabeb725f8747f0867205e87ff02d3bf1a1133fa89d97efc42b0437ccfced02cf629a498936a41e90aa4f5a60f7909550af0901c67458ed06fad9
7
+ data.tar.gz: bfaf6a9b397e1982ca5b3664c6baea762c75a77ed0999b442c0662d4018a2e32a580726a148a3a9666264260a59863cc760aac973f71e54316b9765a3b7b5c10
data/CHANGELOG.md CHANGED
@@ -1,12 +1,42 @@
1
1
  # Changelog
2
2
 
3
- ## [1.8.2] - 2026-05-26
3
+ ## [1.9.1] - 2026-05-27
4
+
5
+ ### Fixed
6
+ - Harden one-line installer path
7
+
8
+
9
+
10
+ ## [1.9.0] - 2026-05-27
4
11
 
5
12
  ### Changed
6
- - Version bump: patch release
13
+ - Version bump: minor release
7
14
 
8
15
  ### Commits in this release
9
- - 41bbd9a chore(gemspec): exclude images and large files from gem packaging
16
+ - 8a2bd84 feat(install): modular installer with deploy plugins, AI wizard pipeline, scrape v2, and test suite (#111)
17
+
18
+
19
+ ## [Unreleased]
20
+
21
+ ### Added
22
+ - **Modular installer (`scripts/install/`)**: spec-driven, AI-aware installer dispatched by `scripts/bin/install`. Single `.zer0/install.spec.json` contract feeds CLI flags, the TUI wizard, and the OpenAI wizard into one apply pipeline.
23
+ - **Deploy plugins**: `tasks/deploy_github-pages.sh`, `tasks/deploy_azure-swa.sh`, `tasks/deploy_docker-prod.sh`. Spec deploy targets now auto-render the matching workflow / config from `templates/deploy/`.
24
+ - **AI wizard end-to-end**: `install wizard --ai` now chains spec generation → `apply_run`, records AI provenance (`ai.used/provider/model`) in the spec, lets CLI flags override AI guesses, and falls back to profile defaults when the model returns empty arrays.
25
+ - **Profile defaults fallback**: `ai/wizard.sh` re-loads the selected profile to fill in empty `deploy`/`agents` arrays from the AI output, ensuring decisive installs.
26
+ - **`generic` agent target** added to spec schema enum (cross-tool `AGENTS.md` baseline alongside `claude`, `cursor`, `aider`, `copilot`).
27
+ - **Installer test suite (`test/test_installer.sh`)**: 17-check regression harness covering module syntax, all 6 profile inits, all 3 deploy plugins, all 5 agent flavours, and the AI wizard pipeline. Wired into `test/test_runner.sh` as the `installer` suite (included in `--suites all` and `--suites full`).
28
+ - **Site scraping (`install scrape <URL>` + `install init --scrape <URL>`)**: new `scripts/install/scrape.sh` BFS crawler + stdlib-only `scripts/install/scrape_html.py` extractor convert any existing website into a fully-rendered zer0-mistakes site. Now distributes pages by detected `kind`: home → `index.md` with `permalink: /`, events → `pages/events/<slug>.md`, posts → `pages/news/<slug>.md`, rest → `pages/<slug>.md`. Downloads referenced images into `assets/scraped/` and rewrites markdown to local paths. Wires navigation into `_data/navigation/main.yml` (the file the theme actually reads) with kind-based Bootstrap Icons, filters junk labels (Back / Cart / Folder:) and `?format=ical`/`?format=json` URLs, skips commerce paths (`/cart`, `/checkout`, `/login`). Seeds `_config.yml` `title`/`description`/`lang`/`logo` from `og:`/`<html lang>` metadata. New flags: `--scrape URL`, `--scrape-depth N` (default 2), `--scrape-max-pages N` (default 25). Covered by `test/test_install_scrape.sh` (standalone + init-integration, asserts new layout + nav cleanliness).
29
+
30
+ ### Fixed
31
+ - `_cmd_wizard` previously left targets containing only `.zer0/install.spec.json`; now chains `apply_run` to write all task outputs.
32
+ - `plan.sh` YAML parser now accepts both `deploy:`/`deploy_targets:` keys and parses `agents:` block lists *and* `ai_features.agent_files:` inline flow lists, matching the actual profile YAML shape.
33
+ - Rewrote `ai/prompts/wizard.system.md` with explicit profile, deploy, and agent heuristics plus a full example output, eliminating empty AI responses.
34
+ - `plan_load_profile` and `plan_apply_flags` now return `0` explicitly so Bash 3.2 doesn't propagate a trailing-test exit code.
35
+
36
+ ## [1.8.2] - 2026-05-26
37
+
38
+ ### Changed
39
+ - Version bump: patch release
10
40
 
11
41
 
12
42
  ## [Unreleased]
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
  title: zer0-mistakes
3
3
  sub-title: AI-Native Jekyll Theme
4
4
  description: AI-native Jekyll theme for GitHub Pages — Docker-first development, AI-powered installation, multi-agent integration (Copilot, Codex, Cursor, Claude), AI preview-image generation, and AIEO content optimization with Bootstrap 5.3.
5
- version: 1.8.2
5
+ version: 1.9.1
6
6
  layout: landing
7
7
  tags:
8
8
  - jekyll
@@ -20,7 +20,7 @@ categories:
20
20
  - bootstrap
21
21
  - ai-tooling
22
22
  created: 2024-02-10T23:51:11.480Z
23
- lastmod: 2026-05-26T01:59:41.000Z
23
+ lastmod: 2026-05-28T02:06:43.000Z
24
24
  draft: false
25
25
  permalink: /
26
26
  slug: zer0
@@ -252,6 +252,9 @@ flowchart LR
252
252
  | Capability | What it does | Where it lives |
253
253
  |---|---|---|
254
254
  | **Self-healing install** | Detects platform, fixes Docker/Jekyll issues, retries with fallbacks | [`install.sh`](install.sh) |
255
+ | **Modular installer CLI** | Spec-driven `init`, `wizard`, `agents`, `deploy`, `doctor`, `scrape` subcommands; declarative profiles; deploy plugins (GitHub Pages, Azure SWA, Docker) | [`scripts/bin/install`](scripts/bin/install), [`scripts/install/`](scripts/install/) |
256
+ | **AI wizard** | `install wizard --ai` generates a site spec via OpenAI, records AI provenance, falls back to profile defaults | [`scripts/install/ai/wizard.sh`](scripts/install/ai/wizard.sh) |
257
+ | **Site scraper** | `install init --scrape <URL>` — BFS-crawls any site, classifies pages by kind, downloads assets, wires nav, seeds config; zero post-processing needed | [`scripts/install/scrape.sh`](scripts/install/scrape.sh), [`scripts/install/scrape_html.py`](scripts/install/scrape_html.py) |
255
258
  | **Cross-tool agent guide** | Single entry point for any [agents.md](https://agents.md/)-aware AI tool | [`AGENTS.md`](AGENTS.md) |
256
259
  | **Copilot project context** | Architecture, conventions, commands, release flow | [`.github/copilot-instructions.md`](.github/copilot-instructions.md) |
257
260
  | **File-scoped instructions** | `applyTo:` globs auto-load guidance for `_layouts/`, `_includes/`, `scripts/`, `test/`, `docs/`, version files | [`.github/instructions/`](.github/instructions/) |
@@ -275,6 +278,12 @@ flowchart LR
275
278
 
276
279
  # Run the AI-facilitated release pipeline (validate → version → changelog → publish)
277
280
  ./scripts/bin/release patch --dry-run
281
+
282
+ # Clone any existing website into a zer0-mistakes site (no OPENAI_API_KEY required)
283
+ ./scripts/bin/install init ./my-clone --scrape https://example.com --scrape-depth 2
284
+
285
+ # Use the AI wizard to interactively generate a site spec (needs OPENAI_API_KEY)
286
+ ./scripts/bin/install wizard --ai ./my-site
278
287
  ```
279
288
 
280
289
  ### Drop-in for any AI editor
@@ -375,9 +384,38 @@ pie title Technology Distribution
375
384
 
376
385
  ## ✨ Key Features
377
386
 
378
- ### 🤖 AI-Powered Installation
387
+ ### 🤖 AI-Powered Installation & Modular Installer
388
+
389
+ Two layers of installation automation:
390
+
391
+ **Classic one-liner** (`install.sh`) — self-healing, ~95% success rate, works on macOS / Linux / Windows WSL:
392
+
393
+ ```bash
394
+ curl -fsSL https://raw.githubusercontent.com/bamr87/zer0-mistakes/main/install.sh | bash
395
+ ```
396
+
397
+ **Modular CLI** (`scripts/bin/install`) — declarative, spec-driven, composable:
379
398
 
380
- The ~1,100-line `install.sh` script provides intelligent platform detection and Docker configuration:
399
+ ```bash
400
+ # Initialise a new site from a profile
401
+ ./scripts/bin/install init ./my-site --profile full
402
+
403
+ # Scaffold deploy configs (GitHub Pages + Docker)
404
+ ./scripts/bin/install deploy github-pages,docker-prod ./my-site
405
+
406
+ # Clone any existing website into a zer0-mistakes site
407
+ ./scripts/bin/install init ./my-clone --scrape https://example.com --scrape-depth 2 --scrape-max-pages 20
408
+
409
+ # AI wizard — generates site spec via OpenAI and runs full apply pipeline
410
+ ./scripts/bin/install wizard --ai ./my-site
411
+
412
+ # Health check / doctor
413
+ ./scripts/bin/install doctor ./my-site
414
+ ```
415
+
416
+ The installer is driven by a single spec file (`.zer0/install.spec.json`) that records every decision — profiles chosen, deploy targets, AI provenance — so the entire setup is reproducible and version-controlled.
417
+
418
+ The ~1,100-line classic `install.sh` provides intelligent platform detection and Docker configuration:
381
419
 
382
420
  ```mermaid
383
421
  flowchart TD
@@ -397,6 +435,57 @@ flowchart TD
397
435
  style DONE fill:#c8e6c9
398
436
  ```
399
437
 
438
+ ### 🌐 Site Scraper — Clone Any Website
439
+
440
+ `install init --scrape <URL>` BFS-crawls an existing website and turns it into a fully rendered zer0-mistakes site with zero post-processing:
441
+
442
+ ```mermaid
443
+ flowchart LR
444
+ subgraph Crawl["🕷 BFS Crawl"]
445
+ C1[Fetch pages]
446
+ C2[Filter junk URLs]
447
+ C3[Classify page kind]
448
+ end
449
+ subgraph Extract["🔍 Extract"]
450
+ E1[Markdown + metadata]
451
+ E2[Image assets]
452
+ E3[Navigation links]
453
+ end
454
+ subgraph Emit["📄 Emit Jekyll"]
455
+ D1[index.md — home]
456
+ D2[pages/events/*.md]
457
+ D3[pages/news/*.md]
458
+ D4[pages/*.md]
459
+ end
460
+ subgraph Wire["🔧 Wire Site"]
461
+ W1[_data/navigation/main.yml]
462
+ W2[assets/scraped/]
463
+ W3[_config.yml seeded]
464
+ end
465
+
466
+ Crawl --> Extract --> Emit --> Wire
467
+ ```
468
+
469
+ | What gets scraped | Where it lands |
470
+ |---|---|
471
+ | Home page | `index.md` with `permalink: /` |
472
+ | Event pages | `pages/events/<slug>.md` |
473
+ | Blog / news posts | `pages/news/<slug>.md` |
474
+ | All other pages | `pages/<slug>.md` |
475
+ | Images | `assets/scraped/<md5>.<ext>` (markdown rewritten to local paths) |
476
+ | Navigation | `_data/navigation/main.yml` (junk labels filtered: Back / Cart / Folder:) |
477
+ | Site metadata | `_config.yml` title / description / lang / logo seeded from `<og:>` tags |
478
+
479
+ Requires only `python3` (stdlib) and `curl` — no `pip` dependencies, no API key.
480
+
481
+ ```bash
482
+ # Clone a site with default depth=2, max-pages=25
483
+ ./scripts/bin/install init ./my-clone --scrape https://example.com
484
+
485
+ # Deeper crawl
486
+ ./scripts/bin/install init ./my-clone --scrape https://example.com --scrape-depth 3 --scrape-max-pages 50
487
+ ```
488
+
400
489
  ### 🐳 Docker-First Development
401
490
 
402
491
  Zero local dependencies required. Works identically across all platforms:
@@ -573,7 +662,9 @@ git clone https://github.com/bamr87/zer0-mistakes.git
573
662
  ./zer0-mistakes/scripts/bin/install agents /path/to/new-site --all # AI agent guidance
574
663
  ```
575
664
 
576
- Available subcommands: `init`, `wizard [--ai]`, `agents`, `deploy`, `doctor`, `diagnose [--ai]`, `upgrade`, `list-profiles`, `list-targets`, `version`, `help`.
665
+ Available subcommands: `init`, `wizard [--ai]`, `agents`, `deploy`, `doctor`, `diagnose [--ai]`, `scrape`, `upgrade`, `list-profiles`, `list-targets`, `version`, `help`.
666
+
667
+ Key `init` flags: `--profile <name>`, `--scrape <URL>`, `--scrape-depth N` (default 2), `--scrape-max-pages N` (default 25), `--skip-doctor`, `--force`.
577
668
 
578
669
  ### Method 2: Remote Theme (GitHub Pages)
579
670
 
@@ -1119,7 +1210,7 @@ git push origin feature/awesome-feature
1119
1210
 
1120
1211
  | Metric | Value |
1121
1212
  |--------|-------|
1122
- | **Current Version** | 1.8.2 ([RubyGems](https://rubygems.org/gems/jekyll-theme-zer0), [CHANGELOG](/CHANGELOG)) |
1213
+ | **Current Version** | 1.9.1 ([RubyGems](https://rubygems.org/gems/jekyll-theme-zer0), [CHANGELOG](/CHANGELOG)) |
1123
1214
  | **Documented Features** | 43 ([Feature Registry](https://github.com/bamr87/zer0-mistakes/blob/main/_data/features.yml)) |
1124
1215
  | **Setup Time** | 2-5 minutes ([install.sh benchmarks](https://github.com/bamr87/zer0-mistakes/blob/main/install.sh)) |
1125
1216
  | **Documentation Pages** | 70+ ([browse docs](/pages/)) |
@@ -1170,6 +1261,6 @@ And these AI partners that make zer0-mistakes truly AI-native:
1170
1261
 
1171
1262
  **Built with ❤️ — and a little help from our AI partners — for the Jekyll community**
1172
1263
 
1173
- **v1.8.2** • [Changelog](CHANGELOG.md) • [License](LICENSE) • [Contributing](CONTRIBUTING.md) • [AI Agent Guide](AGENTS.md)
1264
+ **v1.9.1** • [Changelog](CHANGELOG.md) • [License](LICENSE) • [Contributing](CONTRIBUTING.md) • [AI Agent Guide](AGENTS.md)
1174
1265
 
1175
1266